﻿namespace ExamV5.PaperInfo
{
    using ExamV5;
    using System;
    using System.Configuration;
    using System.Data;
    using System.Data.SqlClient;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public class FrmPaperChooseRubric : Page
    {
        protected Button butDefault;
        protected HtmlForm Form1;
        protected HtmlHead Head1;
        private HttpCookie httpCookie_0 = null;
        private HttpCookie httpCookie_1 = null;
        private HttpCookie httpCookie_2 = null;
        private HttpCookie httpCookie_3 = null;
        private HttpCookie httpCookie_4 = null;
        private int int_0 = 0;
        private int int_1 = 0;
        protected Label labChooseA;
        protected Label labChooseB;
        protected Label labChooseC;
        protected Label labChooseD;
        protected Label labChooseE;
        protected Label labChooseF;
        protected Label labChooseG;
        protected Label labChooseH;
        protected Label labChooseI;
        protected Label labGradeA;
        protected Label labGradeB;
        protected Label labGradeC;
        protected Label labGradeD;
        protected Label labRubricA;
        protected Label labRubricB;
        protected Label labRubricC;
        protected Label labRubricD;
        protected Label labRubricE;
        protected Label labRubricF;
        protected Label labRubricG;
        protected Label labRubricH;
        protected Label labRubricI;
        private PublicFun publicFun_0 = new PublicFun();
        protected ScriptManager SM;
        private string string_0 = "A";
        private string string_1 = "1";
        protected TextBox txtAFen;
        protected TextBox txtBFen;
        protected TextBox txtCFen;
        protected TextBox txtDFen;
        protected TextBox txtGradeAMax;
        protected TextBox txtGradeAMin;
        protected TextBox txtGradeBMax;
        protected TextBox txtGradeBMin;
        protected TextBox txtGradeCMax;
        protected TextBox txtGradeCMin;
        protected TextBox txtGradeDMax;
        protected TextBox txtGradeDMin;
        protected TextBox txtRubricDocA;
        protected TextBox txtRubricDocB;
        protected TextBox txtRubricDocC;
        protected TextBox txtRubricDocD;
        protected TextBox txtRubricDocE;
        protected TextBox txtRubricDocF;
        protected TextBox txtRubricDocG;
        protected TextBox txtRubricDocH;
        protected TextBox txtRubricDocI;
        protected UpdatePanel UPPart;

        protected void butDefault_Click(object sender, EventArgs e)
        {
            string strSql = string.Concat(new object[] { "delete GradeReule where PaperID=", this.int_0, ";insert into GradeReule(ReuleName,MinValue,MaxValue,PaperID,StandFlag,StudyFen) values('", this.labGradeA.Text.Trim(), "',", this.txtGradeAMin.Text.Trim(), ",", this.txtGradeAMax.Text.Trim(), ",", this.int_0, ",'A',", this.txtAFen.Text.Trim(), ")" });
            strSql = string.Concat(new object[] { strSql, ";insert into GradeReule(ReuleName,MinValue,MaxValue,PaperID,StandFlag,StudyFen) values('", this.labGradeB.Text.Trim(), "',", this.txtGradeBMin.Text.Trim(), ",", this.txtGradeBMax.Text.Trim(), ",", this.int_0, ",'B',", this.txtBFen.Text.Trim(), ")" });
            strSql = string.Concat(new object[] { strSql, ";insert into GradeReule(ReuleName,MinValue,MaxValue,PaperID,StandFlag,StudyFen) values('", this.labGradeC.Text.Trim(), "',", this.txtGradeCMin.Text.Trim(), ",", this.txtGradeCMax.Text.Trim(), ",", this.int_0, ",'C',", this.txtCFen.Text.Trim(), ")" });
            strSql = string.Concat(new object[] { strSql, ";insert into GradeReule(ReuleName,MinValue,MaxValue,PaperID,StandFlag,StudyFen) values('", this.labGradeD.Text.Trim(), "',", this.txtGradeDMin.Text.Trim(), ",", this.txtGradeDMax.Text.Trim(), ",", this.int_0, ",'D',", this.txtDFen.Text.Trim(), ")" });
            this.publicFun_0.ExecuteSql(strSql);
            string[] strArray = this.ViewState["RubricDist"].ToString().Split(new char[] { '#' });
            string[] strArray2 = this.ViewState["RubricName"].ToString().Split(new char[] { '#' });
            for (int i = 0; i < (strArray.Length - 1); i++)
            {
                if (Convert.ToInt32(strArray[i]) != 0)
                {
                    switch (i.ToString())
                    {
                        case "0":
                            if (Convert.ToInt32(strArray[i]) != (this.txtRubricDocA.Text.Split(new char[] { '#' }).Length - 1))
                            {
                                ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BCust1", "alert('" + strArray2[i] + "未选满或未选择超出！')", true);
                                return;
                            }
                            if (this.method_2(this.txtRubricDocA.Text))
                            {
                                ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BCust1A", "alert('" + strArray2[i] + "选择的试题中有重复！请重新选择！')", true);
                                return;
                            }
                            break;

                        case "1":
                            if (Convert.ToInt32(strArray[i]) != (this.txtRubricDocB.Text.Split(new char[] { '#' }).Length - 1))
                            {
                                ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BCust2", "alert('" + strArray2[i] + "未选满或未选择超出！')", true);
                                return;
                            }
                            if (!this.method_2(this.txtRubricDocB.Text))
                            {
                                break;
                            }
                            ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BCust2A", "alert('" + strArray2[i] + "选择的试题中有重复！请重新选择！')", true);
                            return;

                        case "2":
                            if (Convert.ToInt32(strArray[i]) != (this.txtRubricDocC.Text.Split(new char[] { '#' }).Length - 1))
                            {
                                ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BCust3", "alert('" + strArray2[i] + "未选满或未选择超出！')", true);
                                return;
                            }
                            if (this.method_2(this.txtRubricDocC.Text))
                            {
                                ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BCust3A", "alert('" + strArray2[i] + "选择的试题中有重复！请重新选择！')", true);
                                return;
                            }
                            break;

                        case "3":
                            if (Convert.ToInt32(strArray[i]) != (this.txtRubricDocD.Text.Split(new char[] { '#' }).Length - 1))
                            {
                                ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BCust4", "alert('" + strArray2[i] + "未选满或未选择超出！')", true);
                                return;
                            }
                            if (this.method_2(this.txtRubricDocD.Text))
                            {
                                ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BCust4A", "alert('" + strArray2[i] + "选择的试题中有重复！请重新选择！')", true);
                                return;
                            }
                            break;

                        case "4":
                            if (Convert.ToInt32(strArray[i]) != (this.txtRubricDocE.Text.Split(new char[] { '#' }).Length - 1))
                            {
                                ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BCust5", "alert('" + strArray2[i] + "未选满或未选择超出！')", true);
                                return;
                            }
                            if (this.method_2(this.txtRubricDocE.Text))
                            {
                                ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BCust5A", "alert('" + strArray2[i] + "选择的试题中有重复！请重新选择！')", true);
                                return;
                            }
                            break;

                        case "5":
                            if (Convert.ToInt32(strArray[i]) != (this.txtRubricDocF.Text.Split(new char[] { '#' }).Length - 1))
                            {
                                ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BCust6", "alert('" + strArray2[i] + "未选满或未选择超出！')", true);
                                return;
                            }
                            if (this.method_2(this.txtRubricDocF.Text))
                            {
                                ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BCust6A", "alert('" + strArray2[i] + "选择的试题中有重复！请重新选择！')", true);
                                return;
                            }
                            break;

                        case "6":
                            if (Convert.ToInt32(strArray[i]) != (this.txtRubricDocG.Text.Split(new char[] { '#' }).Length - 1))
                            {
                                ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BCust7", "alert('" + strArray2[i] + "未选满或未选择超出！')", true);
                                return;
                            }
                            if (!this.method_2(this.txtRubricDocG.Text))
                            {
                                break;
                            }
                            ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BCust7A", "alert('" + strArray2[i] + "选择的试题中有重复！请重新选择！')", true);
                            return;

                        case "7":
                            if (Convert.ToInt32(strArray[i]) != (this.txtRubricDocH.Text.Split(new char[] { '#' }).Length - 1))
                            {
                                ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BCust8", "alert('" + strArray2[i] + "未选满或未选择超出！')", true);
                                return;
                            }
                            if (this.method_2(this.txtRubricDocH.Text))
                            {
                                ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BCust8A", "alert('" + strArray2[i] + "选择的试题中有重复！请重新选择！')", true);
                                return;
                            }
                            break;

                        case "8":
                            if (Convert.ToInt32(strArray[i]) != (this.txtRubricDocI.Text.Split(new char[] { '#' }).Length - 1))
                            {
                                ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BCust9", "alert('" + strArray2[i] + "未选满或未选择超出！')", true);
                                return;
                            }
                            if (this.method_2(this.txtRubricDocI.Text))
                            {
                                ScriptManager.RegisterStartupScript(this.UPPart, this.Page.GetType(), "BCust9A", "alert('" + strArray2[i] + "选择的试题中有重复！请重新选择！')", true);
                                return;
                            }
                            break;
                    }
                }
            }
            strSql = "update PaperDataTmp set RubricS='" + this.txtRubricDocA.Text.Trim() + "',RubricD='" + this.txtRubricDocB.Text.Trim() + "',RubricB='" + this.txtRubricDocC.Text.Trim() + "',RubricF='" + this.txtRubricDocD.Text.Trim() + "',RubricA='" + this.txtRubricDocE.Text.Trim() + "',";
            strSql = string.Concat(new object[] { strSql, "RubricC='", this.txtRubricDocF.Text.Trim(), "',RubricT='", this.txtRubricDocG.Text.Trim(), "',RubricAN='", this.txtRubricDocH.Text.Trim(), "',RubricO='", this.txtRubricDocI.Text.Trim(), "'  where PaperID=", this.int_0 });
            this.publicFun_0.ExecuteSql(strSql);
            string str2 = base.Request.Url.ToString();
            str2 = str2.Substring(0, str2.LastIndexOf('/') + 1);
            base.Response.Redirect(string.Concat(new object[] { str2, "FrmAddUserJoinExam.aspx?AddType=C&IsRead=", this.string_1, "&RuleCust=A&ID=", this.int_0, "&ExamType=", this.string_0 }));
        }

        private void method_0()
        {
            string str = "";
            string str2 = "";
            string str3 = "";
            string cmdText = "";
            if (this.int_1 != 0)
            {
                cmdText = "select a.SubjectID,a.SubjectName,a.RubricDist,a.RubricTypeName,b.RubricS,b.RubricD,b.RubricB,b.RubricF,b.RubricA,b.RubricC,b.RubricT,b.RubricAN,b.RubricO from PaperInfo a,PaperDataTmp b where a.ID=b.PaperID and ID=" + this.int_1;
            }
            else
            {
                cmdText = "select a.SubjectID,a.SubjectName,a.RubricDist,a.RubricTypeName,b.RubricS,b.RubricD,b.RubricB,b.RubricF,b.RubricA,b.RubricC,b.RubricT,b.RubricAN,b.RubricO from PaperInfo a,PaperDataTmp b where a.ID=b.PaperID and ID=" + this.int_0;
            }
            SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            connection.Open();
            SqlCommand command = new SqlCommand(cmdText, connection);
            SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
            if (reader.Read())
            {
                str = reader["RubricDist"].ToString();
                reader["SubjectName"].ToString();
                str2 = reader["SubjectID"].ToString();
                str3 = reader["RubricTypeName"].ToString();
                this.ViewState["RubricDist"] = str;
                this.ViewState["RubricName"] = str3;
                this.txtRubricDocA.Text = reader["RubricS"].ToString();
                this.txtRubricDocB.Text = reader["RubricD"].ToString();
                this.txtRubricDocC.Text = reader["RubricB"].ToString();
                this.txtRubricDocD.Text = reader["RubricF"].ToString();
                this.txtRubricDocE.Text = reader["RubricA"].ToString();
                this.txtRubricDocF.Text = reader["RubricC"].ToString();
                this.txtRubricDocG.Text = reader["RubricT"].ToString();
                this.txtRubricDocH.Text = reader["RubricAN"].ToString();
                this.txtRubricDocI.Text = reader["RubricO"].ToString();
            }
            reader.Close();
            command.Dispose();
            connection.Close();
            connection.Dispose();
            string[] strArray = str.Split(new char[] { '#' });
            string[] strArray2 = str3.Split(new char[] { '#' });
            for (int i = 0; i < strArray.Length; i++)
            {
                switch (i.ToString())
                {
                    case "0":
                        this.labRubricA.Text = strArray2[i].Trim() + "<br>(<font color=red>" + strArray[i].Trim() + "道</font>)";
                        this.labChooseA.Text = "<a href='#' onclick=javascript:ShowChooseRubric('" + this.txtRubricDocA.Text.Trim().Replace('#', '.') + "','" + this.string_1 + "','" + this.string_0 + "','A','" + str2.Replace(',', '.') + "','" + strArray[i].Trim() + "');>选择" + strArray2[i].Trim() + "</a>";
                        break;

                    case "1":
                        this.labRubricB.Text = strArray2[i].Trim() + "<br>(<font color=red>" + strArray[i].Trim() + "道</font>)";
                        this.labChooseB.Text = "<a href='#' onclick=javascript:ShowChooseRubric('" + this.txtRubricDocB.Text.Trim().Replace('#', '.') + "','" + this.string_1 + "','" + this.string_0 + "','B','" + str2.Replace(',', '.') + "','" + strArray[i].Trim() + "');>选择" + strArray2[i].Trim() + "</a>";
                        break;

                    case "2":
                        this.labRubricC.Text = strArray2[i].Trim() + "<br>(<font color=red>" + strArray[i].Trim() + "道</font>)";
                        this.labChooseC.Text = "<a href='#' onclick=javascript:ShowChooseRubric('" + this.txtRubricDocC.Text.Trim().Replace('#', '.') + "','" + this.string_1 + "','" + this.string_0 + "','C','" + str2.Replace(',', '.') + "','" + strArray[i].Trim() + "');>选择" + strArray2[i].Trim() + "</a>";
                        break;

                    case "3":
                        this.labRubricD.Text = strArray2[i].Trim() + "<br>(<font color=red>" + strArray[i].Trim() + "道</font>)";
                        this.labChooseD.Text = "<a href='#' onclick=javascript:ShowChooseRubric('" + this.txtRubricDocD.Text.Trim().Replace('#', '.') + "','" + this.string_1 + "','" + this.string_0 + "','D','" + str2.Replace(',', '.') + "','" + strArray[i].Trim() + "');>选择" + strArray2[i].Trim() + "</a>";
                        break;

                    case "4":
                        this.labRubricE.Text = strArray2[i].Trim() + "<br>(<font color=red>" + strArray[i].Trim() + "道</font>)";
                        this.labChooseE.Text = "<a href='#' onclick=javascript:ShowChooseRubric('" + this.txtRubricDocE.Text.Trim().Replace('#', '.') + "','" + this.string_1 + "','" + this.string_0 + "','E','" + str2.Replace(',', '.') + "','" + strArray[i].Trim() + "');>选择" + strArray2[i].Trim() + "</a>";
                        break;

                    case "5":
                        this.labRubricF.Text = strArray2[i].Trim() + "<br>(<font color=red>" + strArray[i].Trim() + "道</font>)";
                        this.labChooseF.Text = "<a href='#' onclick=javascript:ShowChooseRubric('" + this.txtRubricDocF.Text.Trim().Replace('#', '.') + "','" + this.string_1 + "','" + this.string_0 + "','F','" + str2.Replace(',', '.') + "','" + strArray[i].Trim() + "');>选择" + strArray2[i].Trim() + "</a>";
                        break;

                    case "6":
                        this.labRubricG.Text = strArray2[i].Trim() + "<br>(<font color=red>" + strArray[i].Trim() + "道</font>)";
                        this.labChooseG.Text = "<a href='#' onclick=javascript:ShowChooseRubric('" + this.txtRubricDocG.Text.Trim().Replace('#', '.') + "','" + this.string_1 + "','" + this.string_0 + "','G','" + str2.Replace(',', '.') + "','" + strArray[i].Trim() + "');>选择" + strArray2[i].Trim() + "</a>";
                        break;

                    case "7":
                        this.labRubricH.Text = strArray2[i].Trim() + "<br>(<font color=red>" + strArray[i].Trim() + "道</font>)";
                        this.labChooseH.Text = "<a href='#' onclick=javascript:ShowChooseRubric('" + this.txtRubricDocH.Text.Trim().Replace('#', '.') + "','" + this.string_1 + "','" + this.string_0 + "','H','" + str2.Replace(',', '.') + "','" + strArray[i].Trim() + "');>选择" + strArray2[i].Trim() + "</a>";
                        break;

                    case "8":
                        this.labRubricI.Text = strArray2[i].Trim() + "<br>(<font color=red>" + strArray[i].Trim() + "道</font>)";
                        this.labChooseI.Text = "<a href='#' onclick=javascript:ShowChooseRubric('" + this.txtRubricDocI.Text.Trim().Replace('#', '.') + "','" + this.string_1 + "','" + this.string_0 + "','I','" + str2.Replace(',', '.') + "','" + strArray[i].Trim() + "');>选择" + strArray2[i].Trim() + "</a>";
                        break;
                }
            }
        }

        private void method_1()
        {
            string cmdText = "";
            if (!(this.publicFun_0.GetValues("select ID from GradeReule where PaperID=" + this.int_1, "ID") != ""))
            {
                cmdText = "select * from GradeReule where PaperID=0";
            }
            else
            {
                cmdText = "select * from GradeReule where PaperID=" + this.int_1;
            }
            SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["Conn"].ConnectionString);
            connection.Open();
            SqlCommand command = new SqlCommand(cmdText, connection);
            SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection);
            while (reader.Read())
            {
                switch (reader["StandFlag"].ToString().Trim())
                {
                    case "A":
                        this.labGradeA.Text = reader["ReuleName"].ToString();
                        this.txtGradeAMin.Text = reader["MinValue"].ToString();
                        this.txtGradeAMax.Text = reader["MaxValue"].ToString();
                        this.txtAFen.Text = reader["StudyFen"].ToString();
                        break;

                    case "B":
                        this.labGradeB.Text = reader["ReuleName"].ToString();
                        this.txtGradeBMin.Text = reader["MinValue"].ToString();
                        this.txtGradeBMax.Text = reader["MaxValue"].ToString();
                        this.txtBFen.Text = reader["StudyFen"].ToString();
                        break;

                    case "C":
                        this.labGradeC.Text = reader["ReuleName"].ToString();
                        this.txtGradeCMin.Text = reader["MinValue"].ToString();
                        this.txtGradeCMax.Text = reader["MaxValue"].ToString();
                        this.txtCFen.Text = reader["StudyFen"].ToString();
                        break;

                    case "D":
                        this.labGradeD.Text = reader["ReuleName"].ToString();
                        this.txtGradeDMin.Text = reader["MinValue"].ToString();
                        this.txtGradeDMax.Text = reader["MaxValue"].ToString();
                        this.txtDFen.Text = reader["StudyFen"].ToString();
                        break;
                }
            }
            reader.Close();
            command.Dispose();
            connection.Close();
            connection.Dispose();
        }

        private bool method_2(string string_2)
        {
            bool flag = false;
            if (string_2.Length > 1)
            {
                string_2 = string_2.Substring(0, string_2.Length - 1);
            }
            string[] strArray = string_2.Split(new char[] { '#' });
            string[] strArray2 = string_2.Split(new char[] { '#' });
            for (int i = 0; i < strArray.Length; i++)
            {
                for (int j = i + 1; j < strArray2.Length; j++)
                {
                    if (!((strArray[i].Trim() == strArray2[j].Trim()) ? !(strArray[i].Trim() != "") : true))
                    {
                        goto Label_009B;
                    }
                }
                continue;
            Label_009B:
                flag = true;
            }
            return flag;
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            this.httpCookie_0 = new HttpCookie("ExamUserCode");
            this.httpCookie_0 = base.Request.Cookies["ExamUserCode"];
            this.httpCookie_1 = new HttpCookie("ExamUserName");
            this.httpCookie_1 = base.Request.Cookies["ExamUserName"];
            this.httpCookie_3 = new HttpCookie("ExamUserLevel");
            this.httpCookie_3 = base.Request.Cookies["ExamUserLevel"];
            this.httpCookie_4 = new HttpCookie("ExamDeptID");
            this.httpCookie_4 = base.Request.Cookies["ExamDeptID"];
            this.httpCookie_2 = new HttpCookie("ExamDeptName");
            this.httpCookie_2 = base.Request.Cookies["ExamDeptName"];
            if ((this.httpCookie_0 != null) ? !(this.httpCookie_0.Value == "") : false)
            {
                base.Response.Cache.SetCacheability(HttpCacheability.NoCache);
                base.Response.Cache.SetNoStore();
                this.httpCookie_0.Value = this.publicFun_0.CheckString(base.Server.UrlDecode(this.httpCookie_0.Value));
                this.httpCookie_1.Value = this.publicFun_0.CheckString(base.Server.UrlDecode(this.httpCookie_1.Value));
                this.httpCookie_3.Value = this.publicFun_0.CheckString(base.Server.UrlDecode(this.httpCookie_3.Value));
                this.httpCookie_4.Value = this.publicFun_0.CheckString(base.Server.UrlDecode(this.httpCookie_4.Value));
                this.httpCookie_2.Value = this.publicFun_0.CheckString(base.Server.UrlDecode(this.httpCookie_2.Value));
                this.int_0 = Convert.ToInt32(base.Request["ID"].ToString());
                this.string_0 = base.Request["ExamType"].ToString();
                this.string_1 = base.Request["IsRead"].ToString();
                this.int_1 = Convert.ToInt32(base.Request["UPID"].ToString());
                if (base.IsPostBack)
                {
                    this.txtRubricDocA.Text = base.Request.Form["txtRubricDocA"].ToString().Trim();
                    this.txtRubricDocB.Text = base.Request.Form["txtRubricDocB"].ToString().Trim();
                    this.txtRubricDocC.Text = base.Request.Form["txtRubricDocC"].ToString().Trim();
                    this.txtRubricDocD.Text = base.Request.Form["txtRubricDocD"].ToString().Trim();
                    this.txtRubricDocE.Text = base.Request.Form["txtRubricDocE"].ToString().Trim();
                    this.txtRubricDocF.Text = base.Request.Form["txtRubricDocF"].ToString().Trim();
                    this.txtRubricDocG.Text = base.Request.Form["txtRubricDocG"].ToString().Trim();
                    this.txtRubricDocH.Text = base.Request.Form["txtRubricDocH"].ToString().Trim();
                    this.txtRubricDocI.Text = base.Request.Form["txtRubricDocI"].ToString().Trim();
                }
                else
                {
                    this.ViewState["RubricDist"] = "";
                    this.ViewState["RubricName"] = "";
                    this.method_1();
                    this.publicFun_0.ExecuteSql("delete from PaperRule where PaperID=" + this.int_0);
                    this.method_0();
                    this.butDefault.Attributes.Add("onclick", "javascript:{if(confirm('确定试卷参数无误，要进行下一步吗？')==false) return false;}");
                }
            }
            else
            {
                base.Response.Write("<script language=javascript>top.location.href='../Index.htm';self.close();</script>");
            }
        }
    }
}

